var api = require('../../utils/api.js');
var app = getApp();
Page({
    /**
     * 页面的初始数据
     */
    data: {
        info:[]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    onShow(){
        this.getworkerinfo();
    },

    getworkerinfo(){
        var that=this;

        api.post({
            url: 'worker/getinfo',
            data: {},
            success: data => {
                that.setData({
                    info:data.data
                })

            }
        })

    },
    goindex(){
        wx.switchTab({
          url: '/pages/my/my',
        })
    },
    goorder(){
        wx.navigateTo({
            url: '/pages/work/order',
        })
    },
    goworkerset(){
        wx.navigateTo({
            url: '/pages/workset/index',
        })
    },
    goworkertx(){
        wx.navigateTo({
            url: '/pages/work/money',
        })
    },
    goworker(){
        wx.navigateTo({
            url: '/pages/workset/index',
        })
    },
    gosettime(){
        wx.navigateTo({
            url: '/pages/work/settime',
        })
    }

})